package ufc.sd.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Util {
	private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy");

	public static String formatDate(Date date) {
		if (date == null) {
			return null;
		}
		return DATE_FORMAT.format(date);
	}

	public static Date parseDate(String date) throws ParseException {
		return DATE_FORMAT.parse(date);
	}
}
